home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / elispman.lha / elispman / elisp-30 (.txt) < prev    next >
GNU Info File  |  1993-06-01  |  36KB  |  828 lines

  1. This is Info file elisp, produced by Makeinfo-1.55 from the input file
  2. elisp.texi.
  3.    This is edition 2.0 of the GNU Emacs Lisp Reference Manual, for
  4. Emacs Version 19.
  5.    Published by the Free Software Foundation, 675 Massachusetts Avenue,
  6. Cambridge, MA 02139 USA
  7.    Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided that
  13. the entire resulting derived work is distributed under the terms of a
  14. permission notice identical to this one.
  15.    Permission is granted to copy and distribute translations of this
  16. manual into another language, under the above conditions for modified
  17. versions, except that this permission notice may be stated in a
  18. translation approved by the Foundation.
  19. File: elisp,  Node: Pure Storage,  Next: Garbage Collection,  Prev: Building Emacs,  Up: GNU Emacs Internals
  20. Pure Storage
  21. ============
  22.    There are two types of storage in GNU Emacs Lisp for user-created
  23. Lisp objects: "normal storage" and "pure storage".  Normal storage is
  24. where all the new data which is created during an Emacs session is kept;
  25. see the following section for information on normal storage.  Pure
  26. storage is used for certain data in the preloaded standard Lisp files:
  27. data that should never change during actual use of Emacs.
  28.    Pure storage is allocated only while `temacs' is loading the
  29. standard preloaded Lisp libraries.  In the file `emacs', it is marked
  30. as read-only (on operating systems which permit this), so that the
  31. memory space can be shared by all the Emacs jobs running on the machine
  32. at once.  Pure storage is not expandable; a fixed amount is allocated
  33. when Emacs is compiled, and if that is not sufficient for the preloaded
  34. libraries, `temacs' crashes.  If that happens, you will have to
  35. increase the compilation parameter `PURESIZE' in the file `config.h'.
  36. This normally won't happen unless you try to preload additional
  37. libraries or add features to the standard ones.
  38.  - Function: purecopy OBJECT
  39.      This function makes a copy of OBJECT in pure storage and returns
  40.      it.  It copies strings by simply making a new string with the same
  41.      characters in pure storage.  It recursively copies the contents of
  42.      vectors and cons cells.  It does not make copies of symbols, or any
  43.      other objects, but just returns them unchanged.  It signals an
  44.      error if asked to copy markers.
  45.      This function is used only while Emacs is being built and dumped;
  46.      it is called only in the file `emacs/lisp/loaddefs.el'.
  47.  - Variable: pure-bytes-used
  48.      The value of this variable is the number of bytes of pure storage
  49.      allocated so far.  Typically, in a dumped Emacs, this number is
  50.      very close to the total amount of pure storage available--if it
  51.      were not, we would preallocate less.
  52.  - Variable: purify-flag
  53.      This variable determines whether `defun' should make a copy of the
  54.      function definition in pure storage.  If it is non-`nil', then the
  55.      function definition is copied into pure storage.
  56.      This flag is `t' while loading all of the basic functions for
  57.      building Emacs initially (allowing those functions to be sharable
  58.      and non-collectible).  It is set to `nil' when Emacs is saved out
  59.      as `emacs'.  The flag is set and reset in the C sources.
  60.      You should not change this flag in a running Emacs.
  61. File: elisp,  Node: Garbage Collection,  Next: Writing Emacs Primitives,  Prev: Pure Storage,  Up: GNU Emacs Internals
  62. Garbage Collection
  63. ==================
  64.    When a program creates a list or the user defines a new function
  65. (such as by loading a library), then that data is placed in normal
  66. storage.  If normal storage runs low, then Emacs asks the operating
  67. system to allocate more memory in blocks of 1k bytes.  Each block is
  68. used for one type of Lisp object, so symbols, cons cells, markers, etc.
  69. are segregated in distinct blocks in memory.  (Vectors, buffers and
  70. certain other editing types, which are fairly large, are allocated in
  71. individual blocks, one per object, while strings are packed into blocks
  72. of 8k bytes.)
  73.    It is quite common to use some storage for a while, then release it
  74. by, for example, killing a buffer or deleting the last pointer to an
  75. object.  Emacs provides a "garbage collector" to reclaim this abandoned
  76. storage.  (This name is traditional, but "garbage recycler" might be a
  77. more intuitive metaphor for this facility.)
  78.    The garbage collector operates by scanning all the objects that have
  79. been allocated and marking those that are still accessible to Lisp
  80. programs.  To begin with, all the symbols, their values and associated
  81. function definitions, and any data presently on the stack, are
  82. accessible.  Any objects which can be reached indirectly through other
  83. accessible objects are also accessible.
  84.    When this is finished, all inaccessible objects are garbage.  No
  85. matter what the Lisp program or the user does, it is impossible to refer
  86. to them, since there is no longer a way to reach them.  Their space
  87. might as well be reused, since no one will notice.  That is what the
  88. garbage collector arranges to do.
  89.    Unused cons cells are chained together onto a "free list" for future
  90. allocation; likewise for symbols and markers.  The accessible strings
  91. are compacted so they are contiguous in memory; then the rest of the
  92. space formerly occupied by strings is made available to the string
  93. creation functions.  Vectors, buffers, windows and other large objects
  94. are individually allocated and freed using `malloc'.
  95.      Common Lisp note: unlike other Lisps, GNU Emacs Lisp does not call
  96.      the garbage collector when the free list is empty.  Instead, it
  97.      simply requests the operating system to allocate more storage, and
  98.      processing continues until `gc-cons-threshold' bytes have been
  99.      used.
  100.      This means that you can make sure that the garbage collector will
  101.      not run during a certain portion of a Lisp program by calling the
  102.      garbage collector explicitly just before it (provided that portion
  103.      of the program does not use so much space as to force a second
  104.      garbage collection).
  105.  - Command: garbage-collect
  106.      This command runs a garbage collection, and returns information on
  107.      the amount of space in use.  (Garbage collection can also occur
  108.      spontaneously if you use more than `gc-cons-threshold' bytes of
  109.      Lisp data since the previous garbage collection.)
  110.      `garbage-collect' returns a list containing the following
  111.      information:
  112.           ((USED-CONSES . FREE-CONSES)
  113.            (USED-SYMS . FREE-SYMS)
  114.            (USED-MARKERS . FREE-MARKERS)
  115.            USED-STRING-CHARS
  116.            USED-VECTOR-SLOTS
  117.            (USED-FLOATS . FREE-FLOATS))
  118.           
  119.           (garbage-collect)
  120.                => ((3435 . 2332) (1688 . 0) (57 . 417) 24510 3839 (4 . 1))
  121.      Here is a table explaining each element:
  122.     USED-CONSES
  123.           The number of cons cells in use.
  124.     FREE-CONSES
  125.           The number of cons cells for which space has been obtained
  126.           from the operating system, but that are not currently being
  127.           used.
  128.     USED-SYMS
  129.           The number of symbols in use.
  130.     FREE-SYMS
  131.           The number of symbols for which space has been obtained from
  132.           the operating system, but that are not currently being used.
  133.     USED-MARKERS
  134.           The number of markers in use.
  135.     FREE-MARKERS
  136.           The number of markers for which space has been obtained from
  137.           the operating system, but that are not currently being used.
  138.     USED-STRING-CHARS
  139.           The total size of all strings, in characters.
  140.     USED-VECTOR-SLOTS
  141.           The total number of elements of existing vectors.
  142.     USED-FLOATS
  143.           The number of floats in use.
  144.     FREE-FLOATS
  145.           The number of floats for which space has been obtained from
  146.           the operating system, but that are not currently being used.
  147.  - User Option: gc-cons-threshold
  148.      The value of this variable is the number of bytes of storage that
  149.      must be allocated for Lisp objects after one garbage collection in
  150.      order to request another garbage collection.  A cons cell counts
  151.      as eight bytes, a string as one byte per character plus a few
  152.      bytes of overhead, and so on.  (Space allocated to the contents of
  153.      buffers does not count.)  Note that the new garbage collection
  154.      does not happen immediately when the threshold is exhausted, but
  155.      only the next time the Lisp evaluator is called.
  156.      The initial threshold value is 100,000.  If you specify a larger
  157.      value, garbage collection will happen less often.  This reduces the
  158.      amount of time spent garbage collecting, but increases total
  159.      memory use.  You may want to do this when running a program which
  160.      creates lots of Lisp data.
  161.      You can make collections more frequent by specifying a smaller
  162.      value, down to 10,000.  A value less than 10,000 will remain in
  163.      effect only until the subsequent garbage collection, at which time
  164.      `garbage-collect' will set the threshold back to 10,000.
  165.  - Function: memory-limit
  166.      This function returns the address of the last byte Emacs has
  167.      allocated, divided by 1024.  We divide the value by 1024 to make
  168.      sure it fits in a Lisp integer.
  169.      You can use this to get a general idea of how your actions affect
  170.      the memory usage.
  171. File: elisp,  Node: Writing Emacs Primitives,  Next: Object Internals,  Prev: Garbage Collection,  Up: GNU Emacs Internals
  172. Writing Emacs Primitives
  173. ========================
  174.    Lisp primitives are Lisp functions implemented in C.  The details of
  175. interfacing the C function so that Lisp can call it are handled by a few
  176. C macros.  The only way to really understand how to write new C code is
  177. to read the source, but we can explain some things here.
  178.    An example of a special form is the definition of `or', from
  179. `eval.c'.  (An ordinary function would have the same general
  180. appearance.)
  181.      DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
  182.        "Eval args until one of them yields non-NIL, then return that value.\n\
  183.      The remaining args are not evalled at all.\n\
  184.      If all args return NIL, return NIL.")
  185.        (args)
  186.           Lisp_Object args;
  187.      {
  188.        register Lisp_Object val;
  189.        Lisp_Object args_left;
  190.        struct gcpro gcpro1;
  191.      if (NULL(args))
  192.          return Qnil;
  193.      
  194.        args_left = args;
  195.        GCPRO1 (args_left);
  196.      do
  197.          {
  198.            val = Feval (Fcar (args_left));
  199.            if (!NULL (val))
  200.              break;
  201.            args_left = Fcdr (args_left);
  202.          }
  203.        while (!NULL(args_left));
  204.      UNGCPRO;
  205.        return val;
  206.      }
  207.    Let's start with a precise explanation of the arguments to the
  208. `DEFUN' macro.  Here are the general names for them:
  209.      DEFUN (LNAME, FNAME, SNAME, MIN, MAX, INTERACTIVE, DOC)
  210. LNAME
  211.      This is the name of the Lisp symbol to define with this function;
  212.      in the example above, it is `or'.
  213. FNAME
  214.      This is the C function name for this function.  This is the name
  215.      that is used in C code for calling the function.  The name is, by
  216.      convention, `F' prepended to the Lisp name, with all dashes (`-')
  217.      in the Lisp name changed to underscores.  Thus, to call this
  218.      function from C code, call `For'.  Remember that the arguments must
  219.      be of type `Lisp_Object'; various macros and functions for creating
  220.      values of type `Lisp_Object' are declared in the file `lisp.h'.
  221. SNAME
  222.      This is a C variable name to use for a structure that holds the
  223.      data for the subr object that represents the function in Lisp.
  224.      This structure conveys the Lisp symbol name to the initialization
  225.      routine that will create the symbol and store the subr object as
  226.      its definition.  By convention, this name is always FNAME with `F'
  227.      replaced with `S'.
  228.      This is the minimum number of arguments that the function
  229.      requires.  For `or', no arguments are required.
  230.      This is the maximum number of arguments that the function accepts.
  231.      Alternatively, it can be `UNEVALLED', indicating a special form
  232.      that receives unevaluated arguments.  A function with the
  233.      equivalent of an `&rest' argument would have `MANY' in this
  234.      position.  Both `UNEVALLED' and `MANY' are macros.  This argument
  235.      must be one of these macros or a number at least as large as MIN.
  236.      It may not be greater than six.
  237. INTERACTIVE
  238.      This is an interactive specification, a string such as might be
  239.      used as the argument of `interactive' in a Lisp function.  In the
  240.      case of `or', it is 0 (a null pointer), indicating that `or'
  241.      cannot be called interactively.  A value of `""' indicates an
  242.      interactive function taking no arguments.
  243.      This is the documentation string.  It is written just like a
  244.      documentation string for a function defined in Lisp, except you
  245.      must write `\n\' at the end of each line.  In particular, the
  246.      first line should be a single sentence.
  247.    After the call to the `DEFUN' macro, you must write the list of
  248. argument names that every C function must have, followed by ordinary C
  249. declarations for them.  Normally, all the arguments must be declared as
  250. `Lisp_Object'.  If the function has no upper limit on the number of
  251. arguments in Lisp, then in C it receives two arguments: the number of
  252. Lisp arguments, and the address of a block containing their values.
  253. These have types `int' and `Lisp_Object *'.
  254.    Within the function `For' itself, note the use of the macros
  255. `GCPRO1' and `UNGCPRO'.  `GCPRO1' is used to "protect" a variable from
  256. garbage collection--to inform the garbage collector that it must look
  257. in that variable and regard its contents as an accessible object.  This
  258. is necessary whenever you call `Feval' or anything that can directly or
  259. indirectly call `Feval'.  At such a time, any Lisp object that you
  260. intend to refer to again must be protected somehow.  `UNGCPRO' cancels
  261. the protection of the variables that are protected in the current
  262. function.  It is necessary to do this explicitly.
  263.    For most data types, it suffices to know that one pointer to the
  264. object is protected; as long as the object is not recycled, all pointers
  265. to it remain valid.  This is not so for strings, because the garbage
  266. collector can move them.  When a string is moved, any pointers to it
  267. that the garbage collector does not know about will not be properly
  268. relocated.  Therefore, all pointers to strings must be protected across
  269. any point where garbage collection may be possible.
  270.    The macro `GCPRO1' protects just one local variable.  If you want to
  271. protect two, use `GCPRO2' instead; repeating `GCPRO1' will not work.
  272. There are also `GCPRO3' and `GCPRO4'.
  273.    In addition to using these macros, you must declare the local
  274. variables such as `gcpro1' which they implicitly use.  If you protect
  275. two variables, with `GCPRO2', you must declare `gcpro1' and `gcpro2',
  276. as it uses them both.  Alas, we can't explain all the tricky details
  277. here.
  278.    Defining the C function is not enough; you must also create the Lisp
  279. symbol for the primitive and store a suitable subr object in its
  280. function cell.  This is done by adding code to an initialization
  281. routine.  The code looks like this:
  282.      defsubr (&SUBR-STRUCTURE-NAME);
  283. SUBR-STRUCTURE-NAME is the name you used as the third argument to
  284. `DEFUN'.
  285.    If you are adding a primitive to a file that already has Lisp
  286. primitives defined in it, find the function (near the end of the file)
  287. named `syms_of_SOMETHING', and add that function call to it.  If the
  288. file doesn't have this function, or if you create a new file, add to it
  289. a `syms_of_FILENAME' (e.g., `syms_of_myfile').  Then find the spot in
  290. `emacs.c' where all of these functions are called, and add a call to
  291. `syms_of_FILENAME' there.
  292.    This function `syms_of_FILENAME' is also the place to define any C
  293. variables which are to be visible as Lisp variables.  `DEFVAR_LISP' is
  294. used to make a C variable of type `Lisp_Object' visible in Lisp.
  295. `DEFVAR_INT' is used to make a C variable of type `int' visible in Lisp
  296. with a value that is an integer.
  297.    Here is another function, with more complicated arguments.  This
  298. comes from the code for the X Window System, and it demonstrates the
  299. use of macros and functions to manipulate Lisp objects.
  300.      DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p,
  301.        Scoordinates_in_window_p, 2, 2,
  302.        "xSpecify coordinate pair: \nXExpression which evals to window: ",
  303.        "Return non-nil if POSITIONS is in WINDOW.\n\
  304.        \(POSITIONS is a list, (SCREEN-X SCREEN-Y)\)\n\
  305.      Returned value is list of positions expressed\n\
  306.        relative to window upper left corner.")
  307.        (coordinate, window)
  308.           register Lisp_Object coordinate, window;
  309.      {
  310.        register Lisp_Object xcoord, ycoord;
  311.      if (!CONSP (coordinate)) wrong_type_argument (Qlistp, coordinate);
  312.        CHECK_WINDOW (window, 2);
  313.        xcoord = Fcar (coordinate);
  314.        ycoord = Fcar (Fcdr (coordinate));
  315.        CHECK_NUMBER (xcoord, 0);
  316.        CHECK_NUMBER (ycoord, 1);
  317.      if ((XINT (xcoord) < XINT (XWINDOW (window)->left))
  318.            || (XINT (xcoord) >= (XINT (XWINDOW (window)->left)
  319.                                  + XINT (XWINDOW (window)->width))))
  320.          {
  321.            return Qnil;
  322.          }
  323.        XFASTINT (xcoord) -= XFASTINT (XWINDOW (window)->left);
  324.      if (XINT (ycoord) == (screen_height - 1))
  325.          return Qnil;
  326.      if ((XINT (ycoord) < XINT (XWINDOW (window)->top))
  327.            || (XINT (ycoord) >= (XINT (XWINDOW (window)->top)
  328.                                  + XINT (XWINDOW (window)->height)) - 1))
  329.          {
  330.            return Qnil;
  331.          }
  332.      XFASTINT (ycoord) -= XFASTINT (XWINDOW (window)->top);
  333.        return (Fcons (xcoord, Fcons (ycoord, Qnil)));
  334.      }
  335.    Note that you cannot directly call functions defined in Lisp as, for
  336. example, the primitive function `Fcons' is called above.  You must
  337. create the appropriate Lisp form, protect everything from garbage
  338. collection, and `Feval' the form, as was done in `For' above.
  339.    `eval.c' is a very good file to look through for examples; `lisp.h'
  340. contains the definitions for some important macros and functions.
  341. File: elisp,  Node: Object Internals,  Prev: Writing Emacs Primitives,  Up: GNU Emacs Internals
  342. Object Internals
  343. ================
  344.    GNU Emacs Lisp manipulates many different types of data.  The actual
  345. data are stored in a heap and the only access that programs have to it
  346. is through pointers.  Pointers are thirty-two bits wide in most
  347. implementations.  Depending on the operating system and type of machine
  348. for which you compile Emacs, twenty-four to twenty-six bits are used to
  349. address the object, and the remaining six to eight bits are used for a
  350. tag that identifies the object's type.
  351.    Because all access to data is through tagged pointers, it is always
  352. possible to determine the type of any object.  This allows variables to
  353. be untyped, and the values assigned to them to be changed without regard
  354. to type.  Function arguments also can be of any type; if you want a
  355. function to accept only a certain type of argument, you must check the
  356. type explicitly using a suitable predicate (*note Type Predicates::.).
  357. * Menu:
  358. * Buffer Internals::    Components of a buffer structure.
  359. * Window Internals::    Components of a window structure.
  360. * Process Internals::   Components of a process structure.
  361. File: elisp,  Node: Buffer Internals,  Next: Window Internals,  Prev: Object Internals,  Up: Object Internals
  362. Buffer Internals
  363. ----------------
  364.    Buffers contain fields not directly accessible by the Lisp
  365. programmer.  We describe them here, naming them by the names used in
  366. the C code.  Many are accessible indirectly in Lisp programs via Lisp
  367. primitives.
  368. `name'
  369.      The buffer name is a string which names the buffer.  It is
  370.      guaranteed to be unique.  *Note Buffer Names::.
  371. `save_modified'
  372.      This field contains the time when the buffer was last saved, as an
  373.      integer.  *Note Buffer Modification::.
  374. `modtime'
  375.      This field contains the modification time of the visited file.  It
  376.      is set when the file is written or read.  Every time the buffer is
  377.      written to the file, this field is compared to the modification
  378.      time of the file.  *Note Buffer Modification::.
  379. `auto_save_modified'
  380.      This field contains the time when the buffer was last auto-saved.
  381. `last_window_start'
  382.      This field contains the `window-start' position in the buffer as of
  383.      the last time the buffer was displayed in a window.
  384. `undodata'
  385.      This field points to the buffer's undo stack.  *Note Undo::.
  386. `syntax_table_v'
  387.      This field contains the syntax table for the buffer.  *Note Syntax
  388.      Tables::.
  389. `downcase_table'
  390.      This field contains the conversion table for converting text to
  391.      lower case.  *Note Case Table::.
  392. `upcase_table'
  393.      This field contains the conversion table for converting text to
  394.      upper case.  *Note Case Table::.
  395. `case_canon_table'
  396.      This field contains the conversion table for canonicalizing text
  397.      for case-folding search.  *Note Case Table::.
  398. `case_eqv_table'
  399.      This field contains the equivalence table for case-folding search.
  400.      *Note Case Table::.
  401. `display_table'
  402.      This field contains the buffer's display table, or `nil' if it
  403.      doesn't have one.  *Note Display Tables::.
  404. `markers'
  405.      This field contains the chain of all markers that point into the
  406.      buffer.  At each deletion or motion of the buffer gap, all of these
  407.      markers must be checked and perhaps updated.  *Note Markers::.
  408. `backed_up'
  409.      This field is a flag which tells whether a backup file has been
  410.      made for the visited file of this buffer.
  411. `mark'
  412.      This field contains the mark for the buffer.  The mark is a marker,
  413.      hence it is also included on the list `markers'.  *Note The Mark::.
  414. `local_var_alist'
  415.      This field contains the association list containing all of the
  416.      variables local in this buffer, and their values.  The function
  417.      `buffer-local-variables' returns a copy of this list.  *Note
  418.      Buffer-Local Variables::.
  419. `mode_line_format'
  420.      This field contains a Lisp object which controls how to display
  421.      the mode line for this buffer.  *Note Mode Line Format::.
  422. File: elisp,  Node: Window Internals,  Next: Process Internals,  Prev: Buffer Internals,  Up: Object Internals
  423. Window Internals
  424. ----------------
  425.    Windows have the following accessible fields:
  426. `frame'
  427.      The frame that this window is on.
  428. `mini_p'
  429.      Non-`nil' if this window is a minibuffer window.
  430. `height'
  431.      The height of the window, measured in lines.
  432. `width'
  433.      The width of the window, measured in columns.
  434. `buffer'
  435.      The buffer which the window is displaying.  This may change often
  436.      during the life of the window.
  437. `dedicated'
  438.      Non-`nil' if this window is dedicated to its buffer.
  439. `start'
  440.      The position in the buffer which is the first character to be
  441.      displayed in the window.
  442. `pointm'
  443.      This is the value of point in the current buffer when this window
  444.      is selected; when it is not selected, it retains its previous
  445.      value.
  446. `left'
  447.      This is the left-hand edge of the window, measured in columns.
  448.      (The leftmost column on the screen is column 0.)
  449. `top'
  450.      This is the top edge of the window, measured in lines.  (The top
  451.      line on the screen is line 0.)
  452. `next'
  453.      This is the window that is the next in the chain of siblings.
  454. `prev'
  455.      This is the window that is the previous in the chain of siblings.
  456. `force_start'
  457.      This is a flag which, if non-`nil', says that the window has been
  458.      scrolled explicitly by the Lisp program.  At the next redisplay, if
  459.      point is off the screen, instead of scrolling the window to show
  460.      the text around point, point will be moved to a location that is
  461.      on the screen.
  462. `hscroll'
  463.      This is the number of columns that the display in the window is
  464.      scrolled horizontally to the left.  Normally, this is 0.
  465. `use_time'
  466.      This is the last time that the window was selected.  The function
  467.      `get-lru-window' uses this field.
  468. `display_table'
  469.      The window's display table, or `nil' if none is specified for it.
  470. File: elisp,  Node: Process Internals,  Prev: Window Internals,  Up: Object Internals
  471. Process Internals
  472. -----------------
  473.    The fields of a process are:
  474. `name'
  475.      A string, the name of the process.
  476. `command'
  477.      A list containing the command arguments that were used to start
  478.      this process.
  479. `filter'
  480.      A function used to accept output from the process instead of a
  481.      buffer, or `nil'.
  482. `sentinel'
  483.      A function called whenever the process receives a signal, or `nil'.
  484. `buffer'
  485.      The associated buffer of the process.
  486. `pid'
  487.      An integer, the Unix process ID.
  488. `childp'
  489.      A flag, non-`nil' if this is really a child process.  It is `nil'
  490.      for a network connection.
  491. `flags'
  492.      A symbol indicating the state of the process.  Possible values
  493.      include `run', `stop', `closed', etc.
  494. `reason'
  495.      An integer, the Unix signal number that the process received that
  496.      caused the process to terminate or stop.  If the process has
  497.      exited, then this is the exit code it specified.
  498. `mark'
  499.      A marker indicating the position of end of last output from this
  500.      process inserted into the buffer.  This is usually the end of the
  501.      buffer.
  502. `kill_without_query'
  503.      A flag, non-`nil' meaning this process should not cause
  504.      confirmation to be needed if Emacs is killed.
  505. File: elisp,  Node: Standard Errors,  Next: Standard Buffer-Local Variables,  Prev: GNU Emacs Internals,  Up: Top
  506. Standard Errors
  507. ***************
  508.    Here is the complete list of the error symbols in standard Emacs,
  509. grouped by concept.  The list includes each symbol's message (on the
  510. `error-message' property of the symbol), and a cross reference to a
  511. description of how the error can occur.
  512.    Each error symbol has an `error-conditions' property which is a list
  513. of symbols.  Normally, this list includes the error symbol itself, and
  514. the symbol `error'.  Occasionally it includes additional symbols, which
  515. are intermediate classifications, narrower than `error' but broader
  516. than a single error symbol.  For example, all the errors in accessing
  517. files have the condition `file-error'.
  518.    As a special exception, the error symbol `quit' does not have the
  519. condition `error', because quitting is not considered an error.
  520.    *Note Errors::, for an explanation of how errors are generated and
  521. handled.
  522. `SYMBOL'
  523.      STRING; REFERENCE.
  524. `error'
  525.      `"error"'
  526.      *Note Errors::.
  527. `quit'
  528.      `"Quit"'
  529.      *Note Quitting::.
  530. `args-out-of-range'
  531.      `"Args out of range"'
  532.      *Note Sequences Arrays Vectors::.
  533. `arith-error'
  534.      `"Arithmetic error"'
  535.      See `/' and `%' in *Note Numbers::.
  536. `beginning-of-buffer'
  537.      `"Beginning of buffer"'
  538.      *Note Motion::.
  539. `buffer-read-only'
  540.      `"Buffer is read-only"'
  541.      *Note Read Only Buffers::.
  542. `end-of-buffer'
  543.      `"End of buffer"'
  544.      *Note Motion::.
  545. `end-of-file'
  546.      `"End of file during parsing"'
  547.      This is not a `file-error'.
  548.      *Note Input Functions::.
  549. `file-error'
  550.      This error, and its subcategories, do not have error-strings,
  551.      because the error message is constructed from the data items alone
  552.      when the error condition `file-error' is present.
  553.      *Note Files::.
  554. `file-locked'
  555.      This is a `file-error'.
  556.      *Note File Locks::.
  557. `file-already-exists'
  558.      This is a `file-error'.
  559.      *Note Writing to Files::.
  560. `file-supersession'
  561.      This is a `file-error'.
  562.      *Note Buffer Modification::.
  563. `invalid-function'
  564.      `"Invalid function"'
  565.      *Note Classifying Lists::.
  566. `invalid-read-syntax'
  567.      `"Invalid read syntax"'
  568.      *Note Input Functions::.
  569. `invalid-regexp'
  570.      `"Invalid regexp"'
  571.      *Note Regular Expressions::.
  572. `no-catch'
  573.      `"No catch for tag"'
  574.      *Note Catch and Throw::.
  575. `search-failed'
  576.      `"Search failed"'
  577.      *Note Searching and Matching::.
  578. `setting-constant'
  579.      `"Attempt to set a constant symbol"'
  580.      The values of the symbols `nil' and `t' may not be changed.
  581.      *Note Variables that Never Change: Constant Variables.
  582. `void-function'
  583.      `"Symbol's function definition is void"'
  584.      *Note Function Cells::.
  585. `void-variable'
  586.      `"Symbol's value as variable is void"'
  587.      *Note Accessing Variables::.
  588. `wrong-number-of-arguments'
  589.      `"Wrong number of arguments"'
  590.      *Note Classifying Lists::.
  591. `wrong-type-argument'
  592.      `"Wrong type argument"'
  593.      *Note Type Predicates::.
  594. File: elisp,  Node: Standard Buffer-Local Variables,  Next: Standard Keymaps,  Prev: Standard Errors,  Up: Top
  595. Buffer-Local Variables
  596. **********************
  597.    The table below shows all of the variables that are automatically
  598. local (when set) in each buffer in Emacs Version 18 with the common
  599. packages loaded.
  600. `abbrev-mode'
  601.      *note Abbrevs::.
  602. `auto-fill-function'
  603.      *note Auto Filling::.
  604. `buffer-auto-save-file-name'
  605.      *note Auto-Saving::.
  606. `buffer-backed-up'
  607.      *note Backup Files::.
  608. `buffer-display-table'
  609.      *note Display Tables::.
  610. `buffer-file-name'
  611.      *note Buffer File Name::.
  612. `buffer-file-number'
  613.      *note Buffer File Name::.
  614. `buffer-file-truename'
  615.      *note Buffer File Name::.
  616. `buffer-offer-save'
  617.      *note Saving Buffers::.
  618. `buffer-read-only'
  619.      *note Read Only Buffers::.
  620. `buffer-saved-size'
  621.      *note Point::.
  622. `buffer-undo-list'
  623.      *note Undo::.
  624. `case-fold-search'
  625.      *note Searching and Case::.
  626. `ctl-arrow'
  627.      *note Usual Display::.
  628. `default-directory'
  629.      *note System Environment::.
  630. `fill-column'
  631.      *note Auto Filling::.
  632. `left-margin'
  633.      *note Indentation::.
  634. `local-abbrev-table'
  635.      *note Abbrevs::.
  636. `local-write-file-hooks'
  637.      *note Saving Buffers::.
  638. `major-mode'
  639.      *note Mode Help::.
  640. `mark-active'
  641.      *note The Mark::.
  642. `mark-ring'
  643.      *note The Mark::.
  644. `minor-modes'
  645.      *note Minor Modes::.
  646. `mode-line-format'
  647.      *note Mode Line Data::.
  648. `mode-name'
  649.      *note Mode Line Variables::.
  650. `overwrite-mode'
  651.      *note Insertion::.
  652. `paragraph-separate'
  653.      *note Standard Regexps::.
  654. `paragraph-start'
  655.      *note Standard Regexps::.
  656. `require-final-newline'
  657.      *note Insertion::.
  658. `selective-display'
  659.      *note Selective Display::.
  660. `selective-display-ellipses'
  661.      *note Selective Display::.
  662. `tab-width'
  663.      *note Usual Display::.
  664. `truncate-lines'
  665.      *note Truncation::.
  666. File: elisp,  Node: Standard Keymaps,  Next: Standard Hooks,  Prev: Standard Buffer-Local Variables,  Up: Top
  667. Standard Keymaps
  668. ****************
  669.    The following symbols are used as the names for various keymaps.
  670. Some of these exist when Emacs is first started, others are only loaded
  671. when their respective mode is used.  This is not an exhaustive list.
  672.    Almost all of these maps are used as local maps.  Indeed, of the
  673. modes that presently exist, only Vip mode and Terminal mode ever change
  674. the global keymap.
  675. `Buffer-menu-mode-map'
  676.      A full keymap used by Buffer Menu mode.
  677. `c-mode-map'
  678.      A sparse keymap used in C mode as a local map.
  679. `command-history-map'
  680.      A full keymap used by Command History mode.
  681. `ctl-x-4-map'
  682.      A sparse keymap for subcommands of the prefix `C-x 4'.
  683. `ctl-x-map'
  684.      A full keymap for `C-x' commands.
  685. `debugger-mode-map'
  686.      A full keymap used by Debugger mode.
  687. `dired-mode-map'
  688.      A full keymap for `dired-mode' buffers.
  689. `doctor-mode-map'
  690.      A sparse keymap used by Doctor mode.
  691. `edit-abbrevs-map'
  692.      A sparse keymap used in `edit-abbrevs'.
  693. `edit-tab-stops-map'
  694.      A sparse keymap used in `edit-tab-stops'.
  695. `electric-buffer-menu-mode-map'
  696.      A full keymap used by Electric Buffer Menu mode.
  697. `electric-history-map'
  698.      A full keymap used by Electric Command History mode.
  699. `emacs-lisp-mode-map'
  700.      A sparse keymap used in Emacs Lisp mode.
  701. `function-keymap'
  702.      The keymap for the definitions of keypad and function keys.
  703.      If there are none, then it contains an empty sparse keymap.
  704. `fundamental-mode-map'
  705.      The local keymap for Fundamental mode.
  706.      It is empty and should not be changed.
  707. `Helper-help-map'
  708.      A full keymap used by the help utility package.
  709.      It has the same keymap in its value cell and in its function cell.
  710. `Info-edit-map'
  711.      A sparse keymap used by the `e' command of Info.
  712. `Info-mode-map'
  713.      A sparse keymap containing Info commands.
  714. `isearch-mode-map'
  715.      A keymap that defines the characters you can type within
  716.      incremental search.
  717. `lisp-interaction-mode-map'
  718.      A sparse keymap used in Lisp mode.
  719. `lisp-mode-map'
  720.      A sparse keymap used in Lisp mode.
  721. `mode-specific-map'
  722.      The keymap for characters following `C-c'.  Note, this is in the
  723.      global map.  This map is not actually mode specific: its name was
  724.      chosen to be informative for the user in `C-h b'
  725.      (`display-bindings'), where it describes the main use of the `C-c'
  726.      prefix key.
  727. `occur-mode-map'
  728.      A local keymap used in Occur mode.
  729. `query-replace-map'
  730.      A local keymap used for responses in `query-replace' and related
  731.      commands; also for `y-or-n-p' and `map-y-or-n-p'.  The functions
  732.      that use this map do not support prefix keys; they look up one
  733.      event at a time.
  734. `text-mode-map'
  735.      A sparse keymap used by Text mode.
  736. `view-mode-map'
  737.      A full keymap used by View mode.
  738. File: elisp,  Node: Standard Hooks,  Next: Index,  Prev: Standard Keymaps,  Up: Top
  739. Standard Hooks
  740. **************
  741.    The following is a list of hook variables which let you provide
  742. functions to be called from within Emacs on suitable occasions.
  743.    Most of these variables have names ending with `-hook' are "normal
  744. hooks", that are run with `run-hooks'.  The value of such a hook is a
  745. list of functions.  The recommended way to put a new function on such a
  746. hook is to call `add-hook'.  *Note Hooks::, for more information about
  747. using hooks.
  748.    The variables whose names end in `-function' have single functions
  749. as their values.  Usually there is a specific reason why the variable is
  750. not a normal hook, such as, the need to pass an argument to the
  751. function.  (In older Emacs versions, some of these variables had names
  752. ending in `-hook' even though they were not normal hooks.)
  753.    The variables whose names end in `-hooks' have lists of functions as
  754. their values, but these functions are called in a special way (they are
  755. passed arguments, or else their values are used).
  756. `activate-mark-hook'
  757. `after-change-function'
  758. `after-init-hook'
  759. `auto-fill-function'
  760. `auto-save-hook'
  761. `before-change-function'
  762. `before-init-hook'
  763. `blink-paren-function'
  764. `c-mode-hook'
  765. `command-history-hook'
  766. `comment-indent-function'
  767. `deactivate-mark-hook'
  768. `dired-mode-hook'
  769. `disabled-command-hook'
  770. `edit-picture-hook'
  771. `electric-buffer-menu-mode-hook'
  772. `electric-command-history-hook'
  773. `electric-help-mode-hook'
  774. `emacs-lisp-mode-hook'
  775. `find-file-hooks'
  776. `find-file-not-found-hooks'
  777. `first-change-hook'
  778. `fortran-comment-hook'
  779. `fortran-mode-hook'
  780. `ftp-setup-write-file-hooks'
  781. `ftp-write-file-hook'
  782. `indent-mim-hook'
  783. `LaTeX-mode-hook'
  784. `ledit-mode-hook'
  785. `lisp-indent-function'
  786. `lisp-interaction-mode-hook'
  787. `lisp-mode-hook'
  788. `m2-mode-hook'
  789. `mail-mode-hook'
  790. `mail-setup-hook'
  791. `medit-mode-hook'
  792. `mh-compose-letter-hook'
  793. `mh-folder-mode-hook'
  794. `mh-letter-mode-hook'
  795. `mim-mode-hook'
  796. `news-mode-hook'
  797. `news-reply-mode-hook'
  798. `news-setup-hook'
  799. `nroff-mode-hook'
  800. `outline-mode-hook'
  801. `plain-TeX-mode-hook'
  802. `pre-abbrev-expand-hook'
  803. `pre-command-hook'
  804. `post-command-hook'
  805. `prolog-mode-hook'
  806. `protect-innocence-hook'
  807. `rmail-edit-mode-hook'
  808. `rmail-mode-hook'
  809. `rmail-summary-mode-hook'
  810. `scheme-indent-hook'
  811. `scheme-mode-hook'
  812. `scribe-mode-hook'
  813. `shell-mode-hook'
  814. `shell-set-directory-error-hook'
  815. `suspend-hook'
  816. `suspend-resume-hook'
  817. `temp-buffer-show-function'
  818. `term-setup-hook'
  819. `terminal-mode-hook'
  820. `terminal-mode-break-hook'
  821. `TeX-mode-hook'
  822. `text-mode-hook'
  823. `vi-mode-hook'
  824. `view-hook'
  825. `window-setup-hook'
  826. `write-contents-hooks'
  827. `write-file-hooks'
  828.